# include <stdio.h>
# include <string.h>
# include <stdlib.h>

# define UNIT 1000000

int v[3000];
char coe[1000];
int kase = 0;

int main()
{
	freopen("result.csv", "r", stdin);
	freopen("parse.csv", "w", stdout);

	while (fgets(coe, 1000, stdin))
	{
		memset(v, 0, sizeof(v));

		for (int i = 0; i < 200; i ++)
		{
			int t;

			scanf("%d", &t);

			v[t / UNIT] ++;
		}

		printf("%d:%s", ++kase, coe);
		for (int i = 0; i <= 20; i ++)
		{
			printf("%d\t%d\n", (i + 1) * UNIT, v[i]);
		}

		scanf("%*c%*c");
	}
}